package myschool.cycleadvanced.student;

import java.util.Scanner;

public class IsoscelesTriangle {
    /**
     * 等腰三角形
     */
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        System.out.println("请输入等腰三角的行数");
        int number = input.nextInt();
        for (int i = number,k = 0; i >0; i--) {
            for (int j = i-1; j >0  ; j--) {
                System.out.print(" ");
            }
            k++;
            for (int j = 0; j < k*2-1 ; j++) {
                System.out.print("*");
            }
            System.out.print("\n");
            if(k==number){
                break;
            }
        }
    }
}
